/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MainForm.java
 *
 * Created on Oct 28, 2011, 7:23:57 AM
 */
package breakers_cna_client.responses;

import java.awt.BorderLayout;

/**
 *
 * @author NgocDiem
 */
public class MainForm extends javax.swing.JFrame {

    /** Creates new form MainForm */
    public MainForm() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenu2 = new javax.swing.JMenu();
        jDesktopPaneMainForm = new javax.swing.JDesktopPane();
        jMenuBar2 = new javax.swing.JMenuBar();
        jMenu3 = new javax.swing.JMenu();
        jMenuItemDSFile = new javax.swing.JMenuItem();
        jMenu4 = new javax.swing.JMenu();
        jMenuItemThemFile = new javax.swing.JMenuItem();

        jMenuBar1.setName("jMenuBar1"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(breakers_cna_client.Breakers_CNA_ClientApp.class).getContext().getResourceMap(MainForm.class);
        jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N
        jMenu1.setName("jMenu1"); // NOI18N
        jMenuBar1.add(jMenu1);

        jMenu2.setText(resourceMap.getString("jMenu2.text")); // NOI18N
        jMenu2.setName("jMenu2"); // NOI18N
        jMenuBar1.add(jMenu2);

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setName("Form"); // NOI18N

        jDesktopPaneMainForm.setBackground(resourceMap.getColor("jDesktopPaneMainForm.background")); // NOI18N
        jDesktopPaneMainForm.setName("jDesktopPaneMainForm"); // NOI18N

        jMenuBar2.setName("jMenuBar2"); // NOI18N

        jMenu3.setText(resourceMap.getString("jMenu3.text")); // NOI18N
        jMenu3.setName("jMenu3"); // NOI18N

        jMenuItemDSFile.setText(resourceMap.getString("jMenuItemDSFile.text")); // NOI18N
        jMenuItemDSFile.setName("jMenuItemDSFile"); // NOI18N
        jMenuItemDSFile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemDSFileActionPerformed(evt);
            }
        });
        jMenu3.add(jMenuItemDSFile);

        jMenuBar2.add(jMenu3);

        jMenu4.setText(resourceMap.getString("jMenu4.text")); // NOI18N
        jMenu4.setName("jMenu4"); // NOI18N

        jMenuItemThemFile.setText(resourceMap.getString("jMenuItemThemFile.text")); // NOI18N
        jMenuItemThemFile.setName("jMenuItemThemFile"); // NOI18N
        jMenuItemThemFile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemThemFileActionPerformed(evt);
            }
        });
        jMenu4.add(jMenuItemThemFile);

        jMenuBar2.add(jMenu4);

        setJMenuBar(jMenuBar2);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jDesktopPaneMainForm, javax.swing.GroupLayout.DEFAULT_SIZE, 700, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jDesktopPaneMainForm, javax.swing.GroupLayout.DEFAULT_SIZE, 424, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jMenuItemDSFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemDSFileActionPerformed
//        // TODO add your handling code here:
        ManagerFiles frmFile = new ManagerFiles();
        this.jDesktopPaneMainForm.add(frmFile);
        frmFile.setVisible(true);
    }//GEN-LAST:event_jMenuItemDSFileActionPerformed

    private void jMenuItemThemFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemThemFileActionPerformed
        // TODO add your handling code here:
        AddFile frmAddFile = new AddFile();        
        this.jDesktopPaneMainForm.add(frmAddFile);
        frmAddFile.setVisible(true);
    }//GEN-LAST:event_jMenuItemThemFileActionPerformed

    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        java.awt.EventQueue.invokeLater(new Runnable() {
//
//            public void run() {
//                new MainForm().setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JDesktopPane jDesktopPaneMainForm;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuBar jMenuBar2;
    private javax.swing.JMenuItem jMenuItemDSFile;
    private javax.swing.JMenuItem jMenuItemThemFile;
    // End of variables declaration//GEN-END:variables
}
